#include <string>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;


int main () {
  string line_test;
  string line;
  std::stringstream ss1, ss2;
  std::ofstream outfile;
  /*
  outfile.open("comment_result.txt", std::ios::out);
  ifstream testfile ("test_comment.txt");
  ifstream myfile ("comment.txt");
  if (testfile.is_open() && myfile.is_open())
  {
	 int i=0;
    while ( testfile.good() && myfile.good())
    {
		
		i++;
      getline (testfile,line_test);
	  getline (myfile, line);
	  ss1.str(""); ss1 << line;
	  ss2.str(""); ss2 << line_test;
	  if(ss1.str() != ss2.str())
		  outfile << "line"<<i<<" is wrong! \n" ;
	  else outfile<< "line"<<i<<" is correct \n";
	  
    
	}
    testfile.close();
	myfile.close();
	outfile.close();

  }

  else cout << "Unable to open file"; 
  */
  outfile.open("scope_result.txt", std::ios::out);
  ifstream testfile ("test_scope.txt");
  ifstream myfile ("scope.txt");
  if (testfile.is_open() && myfile.is_open())
  {
	 int i=0;
    while ( testfile.good() && myfile.good())
    {
		
		i++;
      getline (testfile,line_test);
	  getline (myfile, line);
	  ss1.str(""); ss1 << line;
	  ss2.str(""); ss2 << line_test;
	  if(ss1.str() != ss2.str())
		  outfile << "line"<<i<<" is wrong! "<< line<<"\n" ;
	  else outfile<< "line"<<i<<" is correct \n";
	  
    
	}
    testfile.close();
	myfile.close();
	outfile.close();

  }

  else cout << "Unable to open file"; 

}